package grafico;

import javax.swing.ImageIcon;
import javax.swing.JPanel;


import java.awt.Color;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Menu extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * Create the panel.
	 */
	public Menu(final PantallaPrincipal frame) {
		ImageIcon img=new ImageIcon(this.getClass().getResource("/imagenes/icono.jpg"));
		
		setBackground(new Color(105, 105, 105));
		setForeground(new Color(128, 128, 0));
		
		
		JLabel icono = new JLabel(img);
		icono.setBounds(677, 7, 142, 141);
		
		JLabel lblHotelLaribera = new JLabel("Hotel LaRibera");
		lblHotelLaribera.setBounds(75, 59, 224, 37);
		lblHotelLaribera.setForeground(Color.WHITE);
		lblHotelLaribera.setBackground(Color.WHITE);
		lblHotelLaribera.setFont(new Font("Tahoma", Font.BOLD, 30));
		
		JButton btnReservarHabitacin = new JButton("Reservar Habitaci\u00F3n");
		btnReservarHabitacin.setBounds(124, 185, 249, 25);
		btnReservarHabitacin.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnReservarHabitacin.setBackground(new Color(250, 128, 114));
		btnReservarHabitacin.setForeground(Color.WHITE);
		btnReservarHabitacin.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		
		JButton btnCancelarReserva = new JButton("Cancelar Reserva");
		btnCancelarReserva.setBounds(124, 216, 249, 25);
		btnCancelarReserva.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnCancelarReserva.setBackground(new Color(250, 128, 114));
		btnCancelarReserva.setForeground(Color.WHITE);
		
		JButton btnOcuparHabitacin = new JButton("Ocupar Habitaci\u00F3n");
		btnOcuparHabitacin.setBounds(124, 247, 249, 25);
		btnOcuparHabitacin.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnOcuparHabitacin.setBackground(new Color(250, 128, 114));
		btnOcuparHabitacin.setForeground(Color.WHITE);
		btnOcuparHabitacin.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ocuparHabitacion(frame);
			}
		});
		
		JButton btnGestionarPasajero = new JButton("Gestionar Pasajero");
		btnGestionarPasajero.setBounds(124, 278, 249, 25);
		btnGestionarPasajero.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				gestionarPasajero(frame);
			}
		});
		btnGestionarPasajero.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnGestionarPasajero.setBackground(new Color(250, 128, 114));
		btnGestionarPasajero.setForeground(Color.WHITE);
		
		JButton btnGestionarResponsableDe = new JButton("Gestionar Responsable");
		btnGestionarResponsableDe.setBounds(124, 309, 249, 25);
		btnGestionarResponsableDe.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnGestionarResponsableDe.setBackground(new Color(250, 128, 114));
		btnGestionarResponsableDe.setForeground(Color.WHITE);
		
		JButton btnFacturar = new JButton("Facturar");
		btnFacturar.setBounds(124, 338, 249, 25);
		btnFacturar.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnFacturar.setBackground(new Color(250, 128, 114));
		btnFacturar.setForeground(Color.WHITE);
		btnFacturar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				facturar(frame);
			}
		});
		JButton btnIngresarNotaDe = new JButton("Ingresar Nota de Cr\u00E9dito");
		btnIngresarNotaDe.setBounds(124, 369, 249, 25);
		btnIngresarNotaDe.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnIngresarNotaDe.setBackground(new Color(250, 128, 114));
		btnIngresarNotaDe.setForeground(Color.WHITE);
		
		JButton btnIngresarPago = new JButton("Ingresar Pago");
		btnIngresarPago.setBounds(124, 400, 249, 25);
		btnIngresarPago.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnIngresarPago.setBackground(new Color(250, 128, 114));
		btnIngresarPago.setForeground(Color.WHITE);
		btnIngresarPago.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ingresarPago(frame);
			}
		});
		
		JButton btnGestionarListados = new JButton("Gestionar Listados");
		btnGestionarListados.setBounds(124, 431, 249, 25);
		btnGestionarListados.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnGestionarListados.setBackground(new Color(250, 128, 114));
		btnGestionarListados.setForeground(Color.WHITE);
		setLayout(null);
		add(lblHotelLaribera);
		add(icono);
		add(btnGestionarListados);
		add(btnIngresarPago);
		add(btnIngresarNotaDe);
		add(btnFacturar);
		add(btnGestionarResponsableDe);
		add(btnGestionarPasajero);
		add(btnOcuparHabitacin);
		add(btnCancelarReserva);
		add(btnReservarHabitacin);

	}
	private void gestionarPasajero(PantallaPrincipal frame) {
		this.setVisible(false);
		frame.setContentPane(new GestionarPasajero_02(frame));
		
	}
	private void ingresarPago(PantallaPrincipal frame){
		this.setVisible(false);
		frame.setContentPane(new IngresarPago_18_1(frame));
	}
	
	private void ocuparHabitacion(PantallaPrincipal frame){
		this.setVisible(false);
		frame.setContentPane(new OpcuparHabitacion_17(frame));
	}
	private void facturar(PantallaPrincipal frame){
		this.setVisible(false);
		frame.setContentPane(new Facturar_07_1(frame));
	}
	
}
